<?
define('SITE_AREA', 'login');
$jsFile = 'jsLogin.js';
include('includes/appInit.php');

if ($session->logged == 1) {
	header('Location: index.php');
}

if (!empty($_GET['contactID'])) {
	$contactID = $_GET['contactID'];
}

include('includes/header.php');
?>
<div id="content0" style="margin-left: auto; margin-right: auto; width: 700px;" class="x-layout-inactive-content">
		<input type="hidden" id="contactID" value="<?=$contactID; ?>" />
		<input type="hidden" id="memberID" value="<?=$memberID; ?>" />
		
		<h1>Please Login</h1>
		<div id="errorMessage"></div>
				
		<div class="emphBox" id="metaInfo" style="font-size: 1em; width: 100%;">
			<div class="emphBoxInner" id="formLogin">
				<div style="float: left; width: 150px;"><label>User Name</label></div>
				<div style="float: left;"><input type="text" id="userid" name="userid" style="width: 200px;" onKeyPress="if(enterPressed(event)){loginObj.tryLogin('staff');}" /></div>
				<div style="clear: left; height: 10px;"></div>
				
				<div style="float: left; width: 150px;"><label>Password</label></div>
				<div style="float: left;"><input type="password" id="password" name="password" style="width: 200px;" onKeyPress="if(enterPressed(event)){loginObj.tryLogin('staff');}" /></div>
				<div style="clear: left; height: 10px;"></div>
				
				<div style="margin-left: 150px;">
					<a href="#" class="coolButton buttonBGBlueGray" onClick="loginObj.tryLogin('staff'); return false;"><span class="login">Login</span></a><br />
					<a href="#" onClick="findPasswordObj.openFindPasswordForm(); return false;">Find my password</a>
				</div>	
			</div>
			
			<div class="emphBoxInner" id="formFindPassword" style="display: none;">
				<p style="height: 30px;">Enter your email address below and your login information will be sent to you shortly.</p>
				<div style="float: left; width: 150px;"><label>Email Address</label></div>
				<div style="float: left;"><input type="text" id="email" name="email" style="width: 260px;" /></div>
				<div style="clear: left; height: 10px;"></div>
				
				<div style="margin-left: 150px;">
					<div style="float: left; margin-right: 10px;">
						<a href="#" class="coolButton buttonBGBlueGray" onClick="findPasswordObj.findPassword(); return false;"><span class="search">Find</span></a>
					</div>
					<div style="float: left;">
						<a href="#" class="coolButton buttonBGRed" onClick="findPasswordObj.cancel(); return false;"><span class="cancel">Cancel</span></a>
					</div>
					<div style="clear: left;"></div>
				</div>			
			</div>			
		</div>					
</div>  
<div id="south"></div>  
<? include('includes/footer.php'); ?>